Helpful Information
 
 
Category: SQL
SQL -> Array

Hey!

Im trying to get some results from a DB cell into an array.

Table name = stores

Cell 1 = Employee Number
Cell 2 = Stores


Cell 2 will contain something like 1 | 2 | 3 | 4 and I want it to output into an array when I search on cell 1..


Any ideas folks?

Andy

If you are wanting to make the value into array of numbers then try this:



<?php

// Assume $result is your mysql_fetch_assoc() array..

$result['cell_2'] = explode('|', $result['cell_2']);

?>










privacy (GDPR)